/*
 * @Description: 
 * @Author: charles
 * @Date: 2021-11-19 10:11:12
 * @LastEditors: charles
 * @LastEditTime: 2021-11-19 10:25:16
 */
enum Methods {
  GET='get',
  POST='post',
  DELETE='delete'
}
interface Headers {
  'Content-Type':string,
  'Authorization':string
}
interface Options {
  url:string,
  method:Methods,
  timeout:number,
  headers?:Headers,
  foo(a: number, b: number): number,
  bar():string
}

function request(options:Options) {
  console.log('去请求',options);
}

request({
  url:"/article/findAll",
  method:Methods.GET,
  timeout:200,
  foo:function(a:number,b:number){
    return a+b;
  },
  bar(){
    return "";
  }
});

